<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>固定定位技巧</title>
</head>
<style>
    .w {
        width: 800px;
        height: 1400px;
        background-color: red;
        margin: 0 auto;
    }

    .fix {
        position: fixed;
        /*走浏览器宽度一半*/
        left: 50%;
        bottom: 10px;
        margin-left: 410px;
        width: 50px;
        height: 150px;
        background-color: skyblue;
    }

</style>
<body>
<div class="fix"></div>
<div class="w">版心盒子 800像素</div>
</body>
</html>